package com.example.aop.aspect;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

/**
 * ClassName: MyAspetDemo
 * Package: IntelliJ IDEA
 * Description:
 *
 * @Author 谷京京
 * @Create 2023/12/2 12:17
 * @Version 1.0
 */
@Aspect
@Component
@Slf4j
public class MyAspectDemo {
    @Before("@annotation(com.example.aop.aspect.MyAspect)")
    public void doBefore() {
        log.info("执行MyAspectDemo Before...");
    }

    @After("@annotation(org.springframework.web.bind.annotation.RequestMapping)")
    public void doAfter() {
        log.info("执行MyAspectDemo After...");
    }
}
